//
//  BrowsingCollectionViewCell.m
//  collectionView的轮播图
//
//  Created by mac on 2017/4/6.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "BrowsingCollectionViewCell.h"

@interface BrowsingCollectionViewCell()

@property (nonatomic, strong) UIImageView *imageView;

@end


@implementation BrowsingCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UIImageView *imageView = [[UIImageView alloc] init];
        [self addSubview:imageView];
        self.imageView = imageView;
    }
    return self;
}

- (void)setIcon:(NSString *)icon{

    _icon = [icon copy];
    self.imageView.image = [UIImage imageNamed:icon];
}

//- (void)setImg:(UIImage *)img{
//
//    _img = img;
//    self.imageView.image = img;
//}


- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.imageView.frame = self.bounds;

}

@end
